package com.siao.utils.string
{
	import flash.utils.getQualifiedClassName;
	
	/**
	 * 将对象转为字符串，显示其所有属性
	 * @param object
	 * @return
	 */
	public function convert(object:Object):String
	{
		var attributes:Vector.<String> = new Vector.<String>();
		
		for (var attribute:String in object)
		{
			attributes.push(attribute + "=" + object[attribute]);
		}
		
		var name:String = getQualifiedClassName(object);
		name = name.substr(name.indexOf("::") + 2);
		
		return "[" + name + "(" + attributes.join(",") + ")]";
	}

}
